<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
	</body>
</html>
<script type="text/javascript">
	// map同样使用了iterator接口
	let m = new Map();
	// 添加元素
	m.set('name','xiaoming');
	m.set('hello',function(){
		console.log('hello');
	});
	console.log(m);
	let key = {
		school:'school'
	}
	m.set(key,['a','b','c'])
	// size
	console.log(m.size)
	// 删除
	m.delete('name')
	console.log(m)
	// 获取
	console.log(m.get('hello'))
	console.log(m.get(key))
	// 遍历
	for(let v of m){
		console.log(v);
	}
	// 清空
	m.clear()
	console.log(m)
</script>